package com.edisoncgh.service.impl;

import com.edisoncgh.mapper.CategoryMapper;
import com.edisoncgh.pojo.Category;
import com.edisoncgh.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public Category selectById(Integer id) {
        return categoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public Integer selectByName(String name) {
        return categoryMapper.selectByCategoryName(name);
    }
}
